<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="_common/title.jsp" %>
<%
    if (null == session.getAttribute("user")) {
        response.sendRedirect("login.jsp");
    }
%>
<body>
    <%@include  file="_common/header.jsp" %>
    <%@include  file="_common/col-left.jsp" %>

    <div class="col-main col-xs-12 col-sm-6 col-md-9">
        <!-- InstanceBeginEditable name="main" -->
        <div class="title-main"><img class="icon-mail" src="<%=request.getContextPath()%>/_assets/images/bx_mymail.png" /> <label>Mail</label></div>
        <div class="content-main">
            <div class="subMenuMail">
                <table cellspacing="0" cellpadding="0">
                    <tbody>
                        <tr>
                            <td class="usual">
                                <div><a class="sublinks" href="compose.jsp"><span>Compose</span></a></div>
                            </td>
                            <td class="usual">
                                <div><a class="sublinks" href="loadMailOutBox.do"><span>Outbox</span></a></div>
                            </td>
                            <td class="usual">
                                <div><a class="sublinks active" href="loadMailStaff.do"><span>Inbox</span></a></div>
                            </td>
                            <td class="usual">
                                <div><a class="sublinks" href="loadMailTrash.do"><span>Trash</span></a></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="messages_container">
                <table cellspacing="1" cellpadding="0" border="0" class="mailbox">
                    <thead>
                        <tr>
                            <th class="action_section m_author_section">
                                Author
                            </th>
                            <th class="action_section ">
                                Subject
                            </th>
                            <th class="action_section m_subject_section">
                                Content
                            </th>
                            <th class="action_section m_date_section toggle_down">
                                Date
                            </th>
                            <th class="action_section m_date_section toggle_down">
                                Status
                            </th>
                            <th class="action_section m_inputs_section">
                                Actions
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <logic:iterate id="mailitem" name="Mail" property="mail">
                            <tr class="not_filled mailbox_row">
                                <td class="member_section">
                                    <div class="member_info">
                                        ${mailitem.sender}
                                    </div>
                                </td>
                                <td class="type_section">
                                    ${mailitem.subject}
                                </td>
                                <td class="subject_section">
                                    <div class="subject_text">
                                        ${mailitem.content}
                                    </div>
                                </td>
                                <td class="date_section">
                                    ${mailitem.date}
                                </td>
                                <td class="date_section">
                                    ${mailitem.status}
                                </td>
                                <td><a href="trashEmail.do?emailId=${mailitem.emailId}" title="Trash Mail" onclick="return confirm('Do you want to trash this Mail ?')"><img src="<%=request.getContextPath()%>/_assets/images/trash_icon.png" alt="Trash"></a><a  href="loadMailByEmailId.do?emailId=${mailitem.emailId}" title="Read Mail"><img src="<%=request.getContextPath()%>/_assets/images/icon-mail-read.gif" alt="Read Mail"></a></td>
                            </tr>
                        </logic:iterate>

                    </tbody>
                </table>
            </div>
            <!-- InstanceEndEditable -->

        </div>
    </div>
    <!-- ends main-container -->
    <%@include file="_common/footer.jsp" %>

</body>
</html>


